package cn.wolfcode.shop.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

//------------------------一个暂时废弃的Controller------------------------//
@Controller
@RequestMapping("/productinput")
public class ProductInputController {

//    @Reference
//    IProductService productService;
//
//    @RequestMapping("/inputPage")
//    public String inputPage(Model model){
////        List brandList = brandService.selectAll();
////        List catalogList = catalogService.selectAll();
////        model.addAttribute("brands", brandList);
////        model.addAttribute("catalogs", catalogList);
////        return "product/
// product_input";
//        return "";
//    }
//
//    @RequestMapping("/saveproduct")
//    public JsonResultVo saveProduct(ProductVo vo){
//        JsonResultVo jsonResult = new JsonResultVo();
//        try
//        {
//            productService.saveProduct(vo);
//        }
//        catch (Exception e)
//        {
//            e.printStackTrace();
//            jsonResult.setErrorMsg(e.getMessage());
//        }
//        return jsonResult;
//    }
//
//    @RequestMapping("/productimgupload")
//    public String productImgUpload(MultipartFile file) {
////        String basePath = servletContext.getRealPath("/upload");
////        String fileName = UploadUtil.upload(file, basePath);
////        return (new StringBuilder()).append("/upload/").append(fileName).toString();
//        return "";
//    }
//
//    @RequestMapping("/productlist")
//    public String productList(ProductQueryObject qo, Model model) {
////        com.xmg.shop.api.query.PageResult pageResult = productService.query(qo);
////        model.addAttribute("pageResult", pageResult);
////        return "product/product_list";
//        return "";
//    }

}
